// ==UserScript==
// @name         csdn去广告插件
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        http*://blog.csdn.net/*
// @icon         https://g.csdnimg.cn/static/logo/favicon32.ico
// @grant        none
// ==/UserScript==

removeAD();
function removeAD(){
    setTimeout(function(){removeAD();},50);

    // 去掉右侧固定广告
    var adbox = document.getElementById('recommendAdBox');
    if(adbox!=null){
        console.log('去掉右侧固定广告');
        adbox.remove();
    }

    // 显示隐藏的评论
    var comms = document.getElementsByClassName('comment-list-box');
    if(comms.length>0&&comms[0].style['max-height']!=''){
        console.log(comms[0].style['max-height']);
        console.log('显示隐藏起来的评论');
        comms[0].style['max-height']='';
    }

    // 不显示登录提示
    var logintip = document.querySelectorAll('.comment-list-container>.opt-box');
    if(logintip.length>0){
        console.log('不显示登录提示');
        logintip[0].remove();
    }
}